import { defineStore } from "pinia"
import { ref } from 'vue'

export const useCustomerInfoStore = defineStore(
    'customerInfo',
    () => {
        //定义customerInfo
        const customerInfo = ref({})

        //设置customerInfo的值
        function setCustomerInfo (newCustomerInfo: any) {
            customerInfo.value = newCustomerInfo
        }

        //移除customerInfo的值
        function removeCustomerInfo () {
            customerInfo.value = {}
        }

        return {
            customerInfo, setCustomerInfo, removeCustomerInfo
        }
    },
    {
        persist:true
    }
)